package com.ydl.learning.flink.demo.transformations

import com.ydl.learning.flink.demo.Utils
import org.apache.flink.streaming.api.scala._

/**
 *
 *
 * @author ydl
 * @since 2020/9/21
 */

object MapDemo extends Utils {

  /**
   * map算子
   * @param args
   */
  def main(args: Array[String]): Unit = {
    val tuple = getSocketTextStream(9999)
    val textStream = tuple._2
    val value = textStream.map(_.length)
    value.print()
    tuple._1.execute("start")



  }
}
